package com.houseliker.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by sunrx on 2015/12/24.
 */
public class LoanDetail implements Parcelable, Serializable {
    private static final long serialVersionUID = -7047733635801721949L;
    public String year;
    public String month;
    public String payment;
    public String payment_principal;
    public String payment_interest;
    public String surplus;
    public int state;//0白底；1:灰底

    public LoanDetail() {

    }

    protected LoanDetail(Parcel in) {
        year = in.readString();
        month = in.readString();
        payment = in.readString();
        payment_principal = in.readString();
        payment_interest = in.readString();
        surplus = in.readString();
        state = in.readInt();
    }

    public static final Creator<LoanDetail> CREATOR = new Creator<LoanDetail>() {
        @Override
        public LoanDetail createFromParcel(Parcel in) {
            return new LoanDetail(in);
        }

        @Override
        public LoanDetail[] newArray(int size) {
            return new LoanDetail[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(year);
        dest.writeString(month);
        dest.writeString(payment);
        dest.writeString(payment_principal);
        dest.writeString(payment_interest);
        dest.writeString(surplus);
        dest.writeInt(state);
    }
}
